package com.dzh.service;

import com.dzh.dao.ArticleMapper;
import com.dzh.pojo.Articles;

import java.util.List;

public class ArticleServiceImpl implements ArticleService{
    private ArticleMapper articleMapper;
    public void setArticleMapper(ArticleMapper articleMapper){
        this.articleMapper=articleMapper;
    }

    @Override
    public int addArticle(Articles article) {
        return this.articleMapper.addArticle(article);
    }

    public int deleteArticleById(int id){
        return this.articleMapper.deleteArticleById(id);
    }

    public int updateArticle(Articles article){
        return this.articleMapper.updateArticle(article);
    }

    public Articles queryArticleById(int id){
        return this.articleMapper.queryArticleById(id);
    }

    public List<Articles> queryAllArticle(){
        return this.articleMapper.queryAllArticle();
    }


}
